<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>pyprocessing.fbo</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pyprocessing-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="pyprocessing-module.html">Package&nbsp;pyprocessing</a> ::
        Module&nbsp;fbo
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="pyprocessing.fbo-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="pyprocessing.fbo-module.html">Module pyprocessing.fbo</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">pyglet</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">pyglet</tt><tt class="py-op">.</tt><tt class="py-name">gl</tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">ctypes</tt> <tt class="py-keyword">import</tt> <tt class="py-op">*</tt> </tt>
<a name="FBO"></a><div id="FBO-def"><a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt> <a class="py-toggle" href="#" id="FBO-toggle" onclick="return toggle('FBO');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="pyprocessing.fbo.FBO-class.html">FBO</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FBO-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="FBO-expanded"><a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line">    <tt class="py-docstring">"""Basic helper for using OpenGL's Frame Buffer Object (FBO)"""</tt> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line">     </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line">    <tt class="py-decorator">@</tt><tt class="py-decorator">staticmethod</tt> </tt>
<a name="FBO.supported"></a><div id="FBO.supported-def"><a name="L9"></a><tt class="py-lineno">  9</tt> <a class="py-toggle" href="#" id="FBO.supported-toggle" onclick="return toggle('FBO.supported');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyprocessing.fbo.FBO-class.html#supported">supported</a><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FBO.supported-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="FBO.supported-expanded"><a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line">        <tt class="py-docstring">"""A static method that tells if FBOs are supported.</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-docstring">        If not sure, call this before creating an FBO instance."""</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line">         </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line">        <tt class="py-comment"># Check if the board / driver supports FBO</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">gl_info</tt><tt class="py-op">.</tt><tt class="py-name">have_extension</tt><tt class="py-op">(</tt><tt class="py-string">"GL_EXT_framebuffer_object"</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">gl_info</tt><tt class="py-op">.</tt><tt class="py-name">have_extension</tt><tt class="py-op">(</tt><tt class="py-string">"GL_ARB_draw_buffers"</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">False</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line">         </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">True</tt> </tt>
</div><a name="L20"></a><tt class="py-lineno"> 20</tt>  <tt class="py-line"> </tt>
<a name="FBO.__init__"></a><div id="FBO.__init__-def"><a name="L21"></a><tt class="py-lineno"> 21</tt> <a class="py-toggle" href="#" id="FBO.__init__-toggle" onclick="return toggle('FBO.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyprocessing.fbo.FBO-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">width</tt><tt class="py-op">=</tt><tt class="py-number">100</tt><tt class="py-op">,</tt> <tt class="py-param">height</tt><tt class="py-op">=</tt><tt class="py-number">100</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FBO.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="FBO.__init__-expanded"><a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line">        <tt class="py-docstring">"""Creates a Frame Buffer Object (FBO)"""</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">     </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line">        <tt class="py-comment"># Must be supported...</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">assert</tt> <tt class="py-op">(</tt><tt id="link-0" class="py-name" targets="Class pyprocessing.fbo.FBO=pyprocessing.fbo.FBO-class.html"><a title="pyprocessing.fbo.FBO" class="py-name" href="#" onclick="return doclink('link-0', 'FBO', 'link-0');">FBO</a></tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Static Method pyprocessing.fbo.FBO.supported()=pyprocessing.fbo.FBO-class.html#supported"><a title="pyprocessing.fbo.FBO.supported" class="py-name" href="#" onclick="return doclink('link-1', 'supported', 'link-1');">supported</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line">         </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-2" class="py-name" targets="Variable pyprocessing.globs.screen.width=pyprocessing.globs.screen-class.html#width,Variable pyprocessing.pimage.PImage.width=pyprocessing.pimage.PImage-class.html#width"><a title="pyprocessing.globs.screen.width
pyprocessing.pimage.PImage.width" class="py-name" href="#" onclick="return doclink('link-2', 'width', 'link-2');">width</a></tt> <tt class="py-op">=</tt> <tt id="link-3" class="py-name"><a title="pyprocessing.globs.screen.width
pyprocessing.pimage.PImage.width" class="py-name" href="#" onclick="return doclink('link-3', 'width', 'link-2');">width</a></tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Variable pyprocessing.globs.screen.height=pyprocessing.globs.screen-class.html#height,Variable pyprocessing.pimage.PImage.height=pyprocessing.pimage.PImage-class.html#height"><a title="pyprocessing.globs.screen.height
pyprocessing.pimage.PImage.height" class="py-name" href="#" onclick="return doclink('link-4', 'height', 'link-4');">height</a></tt> <tt class="py-op">=</tt> <tt id="link-5" class="py-name"><a title="pyprocessing.globs.screen.height
pyprocessing.pimage.PImage.height" class="py-name" href="#" onclick="return doclink('link-5', 'height', 'link-4');">height</a></tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line">  </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">        <tt class="py-comment"># Setting it up</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">framebuffer</tt> <tt class="py-op">=</tt> <tt class="py-name">c_uint</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">depthbuffer</tt> <tt class="py-op">=</tt> <tt class="py-name">c_uint</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-6" class="py-name" targets="Variable pyprocessing.pimage.PImage.img=pyprocessing.pimage.PImage-class.html#img"><a title="pyprocessing.pimage.PImage.img" class="py-name" href="#" onclick="return doclink('link-6', 'img', 'link-6');">img</a></tt> <tt class="py-op">=</tt> <tt class="py-name">c_uint</tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">         </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">        <tt id="link-7" class="py-name" targets="Variable pyprocessing.lights'.glGenFramebuffersEXT=pyprocessing.lights%27-module.html#glGenFramebuffersEXT"><a title="pyprocessing.lights'.glGenFramebuffersEXT" class="py-name" href="#" onclick="return doclink('link-7', 'glGenFramebuffersEXT', 'link-7');">glGenFramebuffersEXT</a></tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-name">byref</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">framebuffer</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">        <tt id="link-8" class="py-name" targets="Variable pyprocessing.lights'.glBindFramebufferEXT=pyprocessing.lights%27-module.html#glBindFramebufferEXT"><a title="pyprocessing.lights'.glBindFramebufferEXT" class="py-name" href="#" onclick="return doclink('link-8', 'glBindFramebufferEXT', 'link-8');">glBindFramebufferEXT</a></tt><tt class="py-op">(</tt><tt id="link-9" class="py-name" targets="Variable pyprocessing.lights'.GL_FRAMEBUFFER_EXT=pyprocessing.lights%27-module.html#GL_FRAMEBUFFER_EXT"><a title="pyprocessing.lights'.GL_FRAMEBUFFER_EXT" class="py-name" href="#" onclick="return doclink('link-9', 'GL_FRAMEBUFFER_EXT', 'link-9');">GL_FRAMEBUFFER_EXT</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">framebuffer</tt><tt class="py-op">)</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">         </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">        <tt class="py-comment"># Adding a Depth Buffer</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt id="link-10" class="py-name" targets="Variable pyprocessing.lights'.glGenRenderbuffersEXT=pyprocessing.lights%27-module.html#glGenRenderbuffersEXT"><a title="pyprocessing.lights'.glGenRenderbuffersEXT" class="py-name" href="#" onclick="return doclink('link-10', 'glGenRenderbuffersEXT', 'link-10');">glGenRenderbuffersEXT</a></tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-name">byref</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">depthbuffer</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">        <tt id="link-11" class="py-name" targets="Variable pyprocessing.lights'.glBindRenderbufferEXT=pyprocessing.lights%27-module.html#glBindRenderbufferEXT"><a title="pyprocessing.lights'.glBindRenderbufferEXT" class="py-name" href="#" onclick="return doclink('link-11', 'glBindRenderbufferEXT', 'link-11');">glBindRenderbufferEXT</a></tt><tt class="py-op">(</tt><tt id="link-12" class="py-name" targets="Variable pyprocessing.lights'.GL_RENDERBUFFER_EXT=pyprocessing.lights%27-module.html#GL_RENDERBUFFER_EXT"><a title="pyprocessing.lights'.GL_RENDERBUFFER_EXT" class="py-name" href="#" onclick="return doclink('link-12', 'GL_RENDERBUFFER_EXT', 'link-12');">GL_RENDERBUFFER_EXT</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">depthbuffer</tt><tt class="py-op">)</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">        <tt id="link-13" class="py-name" targets="Variable pyprocessing.lights'.glRenderbufferStorageEXT=pyprocessing.lights%27-module.html#glRenderbufferStorageEXT"><a title="pyprocessing.lights'.glRenderbufferStorageEXT" class="py-name" href="#" onclick="return doclink('link-13', 'glRenderbufferStorageEXT', 'link-13');">glRenderbufferStorageEXT</a></tt><tt class="py-op">(</tt><tt id="link-14" class="py-name"><a title="pyprocessing.lights'.GL_RENDERBUFFER_EXT" class="py-name" href="#" onclick="return doclink('link-14', 'GL_RENDERBUFFER_EXT', 'link-12');">GL_RENDERBUFFER_EXT</a></tt><tt class="py-op">,</tt> <tt id="link-15" class="py-name" targets="Variable pyprocessing.lights'.GL_DEPTH_COMPONENT=pyprocessing.lights%27-module.html#GL_DEPTH_COMPONENT"><a title="pyprocessing.lights'.GL_DEPTH_COMPONENT" class="py-name" href="#" onclick="return doclink('link-15', 'GL_DEPTH_COMPONENT', 'link-15');">GL_DEPTH_COMPONENT</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name"><a title="pyprocessing.globs.screen.width
pyprocessing.pimage.PImage.width" class="py-name" href="#" onclick="return doclink('link-16', 'width', 'link-2');">width</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name"><a title="pyprocessing.globs.screen.height
pyprocessing.pimage.PImage.height" class="py-name" href="#" onclick="return doclink('link-17', 'height', 'link-4');">height</a></tt><tt class="py-op">)</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">        <tt id="link-18" class="py-name" targets="Variable pyprocessing.lights'.glFramebufferRenderbufferEXT=pyprocessing.lights%27-module.html#glFramebufferRenderbufferEXT"><a title="pyprocessing.lights'.glFramebufferRenderbufferEXT" class="py-name" href="#" onclick="return doclink('link-18', 'glFramebufferRenderbufferEXT', 'link-18');">glFramebufferRenderbufferEXT</a></tt><tt class="py-op">(</tt><tt id="link-19" class="py-name"><a title="pyprocessing.lights'.GL_FRAMEBUFFER_EXT" class="py-name" href="#" onclick="return doclink('link-19', 'GL_FRAMEBUFFER_EXT', 'link-9');">GL_FRAMEBUFFER_EXT</a></tt><tt class="py-op">,</tt> <tt id="link-20" class="py-name" targets="Variable pyprocessing.lights'.GL_DEPTH_ATTACHMENT_EXT=pyprocessing.lights%27-module.html#GL_DEPTH_ATTACHMENT_EXT"><a title="pyprocessing.lights'.GL_DEPTH_ATTACHMENT_EXT" class="py-name" href="#" onclick="return doclink('link-20', 'GL_DEPTH_ATTACHMENT_EXT', 'link-20');">GL_DEPTH_ATTACHMENT_EXT</a></tt><tt class="py-op">,</tt>  </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">                                     <tt id="link-21" class="py-name"><a title="pyprocessing.lights'.GL_RENDERBUFFER_EXT" class="py-name" href="#" onclick="return doclink('link-21', 'GL_RENDERBUFFER_EXT', 'link-12');">GL_RENDERBUFFER_EXT</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">depthbuffer</tt><tt class="py-op">)</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">     </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">        <tt class="py-comment"># Adding a Texture To Render To</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt id="link-22" class="py-name" targets="Variable pyprocessing.lights'.glGenTextures=pyprocessing.lights%27-module.html#glGenTextures"><a title="pyprocessing.lights'.glGenTextures" class="py-name" href="#" onclick="return doclink('link-22', 'glGenTextures', 'link-22');">glGenTextures</a></tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-name">byref</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-23" class="py-name"><a title="pyprocessing.pimage.PImage.img" class="py-name" href="#" onclick="return doclink('link-23', 'img', 'link-6');">img</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">        <tt id="link-24" class="py-name" targets="Variable pyprocessing.lights'.glBindTexture=pyprocessing.lights%27-module.html#glBindTexture"><a title="pyprocessing.lights'.glBindTexture" class="py-name" href="#" onclick="return doclink('link-24', 'glBindTexture', 'link-24');">glBindTexture</a></tt><tt class="py-op">(</tt><tt id="link-25" class="py-name" targets="Variable pyprocessing.lights'.GL_TEXTURE_2D=pyprocessing.lights%27-module.html#GL_TEXTURE_2D"><a title="pyprocessing.lights'.GL_TEXTURE_2D" class="py-name" href="#" onclick="return doclink('link-25', 'GL_TEXTURE_2D', 'link-25');">GL_TEXTURE_2D</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-26" class="py-name"><a title="pyprocessing.pimage.PImage.img" class="py-name" href="#" onclick="return doclink('link-26', 'img', 'link-6');">img</a></tt><tt class="py-op">)</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">     </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">        <tt class="py-comment"># Black magic (only works with these two lines)</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># (nearest works, as well as linear)</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt id="link-27" class="py-name" targets="Variable pyprocessing.lights'.glTexParameteri=pyprocessing.lights%27-module.html#glTexParameteri"><a title="pyprocessing.lights'.glTexParameteri" class="py-name" href="#" onclick="return doclink('link-27', 'glTexParameteri', 'link-27');">glTexParameteri</a></tt><tt class="py-op">(</tt><tt id="link-28" class="py-name"><a title="pyprocessing.lights'.GL_TEXTURE_2D" class="py-name" href="#" onclick="return doclink('link-28', 'GL_TEXTURE_2D', 'link-25');">GL_TEXTURE_2D</a></tt><tt class="py-op">,</tt><tt id="link-29" class="py-name" targets="Variable pyprocessing.lights'.GL_TEXTURE_MAG_FILTER=pyprocessing.lights%27-module.html#GL_TEXTURE_MAG_FILTER"><a title="pyprocessing.lights'.GL_TEXTURE_MAG_FILTER" class="py-name" href="#" onclick="return doclink('link-29', 'GL_TEXTURE_MAG_FILTER', 'link-29');">GL_TEXTURE_MAG_FILTER</a></tt><tt class="py-op">,</tt><tt id="link-30" class="py-name" targets="Variable pyprocessing.lights'.GL_LINEAR=pyprocessing.lights%27-module.html#GL_LINEAR"><a title="pyprocessing.lights'.GL_LINEAR" class="py-name" href="#" onclick="return doclink('link-30', 'GL_LINEAR', 'link-30');">GL_LINEAR</a></tt><tt class="py-op">)</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">        <tt id="link-31" class="py-name"><a title="pyprocessing.lights'.glTexParameteri" class="py-name" href="#" onclick="return doclink('link-31', 'glTexParameteri', 'link-27');">glTexParameteri</a></tt><tt class="py-op">(</tt><tt id="link-32" class="py-name"><a title="pyprocessing.lights'.GL_TEXTURE_2D" class="py-name" href="#" onclick="return doclink('link-32', 'GL_TEXTURE_2D', 'link-25');">GL_TEXTURE_2D</a></tt><tt class="py-op">,</tt><tt id="link-33" class="py-name" targets="Variable pyprocessing.lights'.GL_TEXTURE_MIN_FILTER=pyprocessing.lights%27-module.html#GL_TEXTURE_MIN_FILTER"><a title="pyprocessing.lights'.GL_TEXTURE_MIN_FILTER" class="py-name" href="#" onclick="return doclink('link-33', 'GL_TEXTURE_MIN_FILTER', 'link-33');">GL_TEXTURE_MIN_FILTER</a></tt><tt class="py-op">,</tt><tt id="link-34" class="py-name"><a title="pyprocessing.lights'.GL_LINEAR" class="py-name" href="#" onclick="return doclink('link-34', 'GL_LINEAR', 'link-30');">GL_LINEAR</a></tt><tt class="py-op">)</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line"> </tt>
<a name="L54"></a><tt class="py-lineno"> 54</tt>  <tt class="py-line">        <tt class="py-comment"># Add the texture to the frame buffer as a color buffer</tt> </tt>
<a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt id="link-35" class="py-name" targets="Variable pyprocessing.lights'.glTexImage2D=pyprocessing.lights%27-module.html#glTexImage2D"><a title="pyprocessing.lights'.glTexImage2D" class="py-name" href="#" onclick="return doclink('link-35', 'glTexImage2D', 'link-35');">glTexImage2D</a></tt><tt class="py-op">(</tt><tt id="link-36" class="py-name"><a title="pyprocessing.lights'.GL_TEXTURE_2D" class="py-name" href="#" onclick="return doclink('link-36', 'GL_TEXTURE_2D', 'link-25');">GL_TEXTURE_2D</a></tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt id="link-37" class="py-name" targets="Variable pyprocessing.lights'.GL_RGBA8=pyprocessing.lights%27-module.html#GL_RGBA8"><a title="pyprocessing.lights'.GL_RGBA8" class="py-name" href="#" onclick="return doclink('link-37', 'GL_RGBA8', 'link-37');">GL_RGBA8</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-38" class="py-name"><a title="pyprocessing.globs.screen.width
pyprocessing.pimage.PImage.width" class="py-name" href="#" onclick="return doclink('link-38', 'width', 'link-2');">width</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-39" class="py-name"><a title="pyprocessing.globs.screen.height
pyprocessing.pimage.PImage.height" class="py-name" href="#" onclick="return doclink('link-39', 'height', 'link-4');">height</a></tt><tt class="py-op">,</tt>  </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">                     <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt id="link-40" class="py-name" targets="Variable pyprocessing.lights'.GL_RGBA=pyprocessing.lights%27-module.html#GL_RGBA"><a title="pyprocessing.lights'.GL_RGBA" class="py-name" href="#" onclick="return doclink('link-40', 'GL_RGBA', 'link-40');">GL_RGBA</a></tt><tt class="py-op">,</tt> <tt id="link-41" class="py-name" targets="Variable pyprocessing.lights'.GL_UNSIGNED_BYTE=pyprocessing.lights%27-module.html#GL_UNSIGNED_BYTE"><a title="pyprocessing.lights'.GL_UNSIGNED_BYTE" class="py-name" href="#" onclick="return doclink('link-41', 'GL_UNSIGNED_BYTE', 'link-41');">GL_UNSIGNED_BYTE</a></tt><tt class="py-op">,</tt> <tt class="py-name">None</tt><tt class="py-op">)</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">        <tt id="link-42" class="py-name" targets="Variable pyprocessing.lights'.glFramebufferTexture2DEXT=pyprocessing.lights%27-module.html#glFramebufferTexture2DEXT"><a title="pyprocessing.lights'.glFramebufferTexture2DEXT" class="py-name" href="#" onclick="return doclink('link-42', 'glFramebufferTexture2DEXT', 'link-42');">glFramebufferTexture2DEXT</a></tt><tt class="py-op">(</tt><tt id="link-43" class="py-name"><a title="pyprocessing.lights'.GL_FRAMEBUFFER_EXT" class="py-name" href="#" onclick="return doclink('link-43', 'GL_FRAMEBUFFER_EXT', 'link-9');">GL_FRAMEBUFFER_EXT</a></tt><tt class="py-op">,</tt> <tt id="link-44" class="py-name" targets="Variable pyprocessing.lights'.GL_COLOR_ATTACHMENT0_EXT=pyprocessing.lights%27-module.html#GL_COLOR_ATTACHMENT0_EXT"><a title="pyprocessing.lights'.GL_COLOR_ATTACHMENT0_EXT" class="py-name" href="#" onclick="return doclink('link-44', 'GL_COLOR_ATTACHMENT0_EXT', 'link-44');">GL_COLOR_ATTACHMENT0_EXT</a></tt><tt class="py-op">,</tt>  </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">                     <tt id="link-45" class="py-name"><a title="pyprocessing.lights'.GL_TEXTURE_2D" class="py-name" href="#" onclick="return doclink('link-45', 'GL_TEXTURE_2D', 'link-25');">GL_TEXTURE_2D</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name"><a title="pyprocessing.pimage.PImage.img" class="py-name" href="#" onclick="return doclink('link-46', 'img', 'link-6');">img</a></tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">     </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">        <tt class="py-comment"># Check if it worked so far</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-name">status</tt> <tt class="py-op">=</tt> <tt id="link-47" class="py-name" targets="Variable pyprocessing.lights'.glCheckFramebufferStatusEXT=pyprocessing.lights%27-module.html#glCheckFramebufferStatusEXT"><a title="pyprocessing.lights'.glCheckFramebufferStatusEXT" class="py-name" href="#" onclick="return doclink('link-47', 'glCheckFramebufferStatusEXT', 'link-47');">glCheckFramebufferStatusEXT</a></tt><tt class="py-op">(</tt><tt id="link-48" class="py-name"><a title="pyprocessing.lights'.GL_FRAMEBUFFER_EXT" class="py-name" href="#" onclick="return doclink('link-48', 'GL_FRAMEBUFFER_EXT', 'link-9');">GL_FRAMEBUFFER_EXT</a></tt><tt class="py-op">)</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">        <tt class="py-keyword">assert</tt><tt class="py-op">(</tt><tt class="py-name">status</tt> <tt class="py-op">==</tt> <tt id="link-49" class="py-name" targets="Variable pyprocessing.lights'.GL_FRAMEBUFFER_COMPLETE_EXT=pyprocessing.lights%27-module.html#GL_FRAMEBUFFER_COMPLETE_EXT"><a title="pyprocessing.lights'.GL_FRAMEBUFFER_COMPLETE_EXT" class="py-name" href="#" onclick="return doclink('link-49', 'GL_FRAMEBUFFER_COMPLETE_EXT', 'link-49');">GL_FRAMEBUFFER_COMPLETE_EXT</a></tt><tt class="py-op">)</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">         </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">        <tt class="py-comment"># Release framebuffer</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt id="link-50" class="py-name"><a title="pyprocessing.lights'.glBindFramebufferEXT" class="py-name" href="#" onclick="return doclink('link-50', 'glBindFramebufferEXT', 'link-8');">glBindFramebufferEXT</a></tt><tt class="py-op">(</tt><tt id="link-51" class="py-name"><a title="pyprocessing.lights'.GL_FRAMEBUFFER_EXT" class="py-name" href="#" onclick="return doclink('link-51', 'GL_FRAMEBUFFER_EXT', 'link-9');">GL_FRAMEBUFFER_EXT</a></tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
</div><a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line"> </tt>
<a name="FBO.attach"></a><div id="FBO.attach-def"><a name="L67"></a><tt class="py-lineno"> 67</tt> <a class="py-toggle" href="#" id="FBO.attach-toggle" onclick="return toggle('FBO.attach');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyprocessing.fbo.FBO-class.html#attach">attach</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FBO.attach-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="FBO.attach-expanded"><a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">        <tt class="py-docstring">"""Call this before rendering to the FBO."""</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line"> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">        <tt class="py-comment"># First we bind the FBO so we can render to it</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt id="link-52" class="py-name"><a title="pyprocessing.lights'.glBindFramebufferEXT" class="py-name" href="#" onclick="return doclink('link-52', 'glBindFramebufferEXT', 'link-8');">glBindFramebufferEXT</a></tt><tt class="py-op">(</tt><tt id="link-53" class="py-name"><a title="pyprocessing.lights'.GL_FRAMEBUFFER_EXT" class="py-name" href="#" onclick="return doclink('link-53', 'GL_FRAMEBUFFER_EXT', 'link-9');">GL_FRAMEBUFFER_EXT</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">framebuffer</tt><tt class="py-op">)</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">         </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">        <tt class="py-comment"># Save the view port and set it to the size of the texture</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt id="link-54" class="py-name" targets="Variable pyprocessing.lights'.glPushAttrib=pyprocessing.lights%27-module.html#glPushAttrib"><a title="pyprocessing.lights'.glPushAttrib" class="py-name" href="#" onclick="return doclink('link-54', 'glPushAttrib', 'link-54');">glPushAttrib</a></tt><tt class="py-op">(</tt><tt id="link-55" class="py-name" targets="Variable pyprocessing.lights'.GL_VIEWPORT_BIT=pyprocessing.lights%27-module.html#GL_VIEWPORT_BIT"><a title="pyprocessing.lights'.GL_VIEWPORT_BIT" class="py-name" href="#" onclick="return doclink('link-55', 'GL_VIEWPORT_BIT', 'link-55');">GL_VIEWPORT_BIT</a></tt><tt class="py-op">)</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">        <tt id="link-56" class="py-name" targets="Variable pyprocessing.lights'.glViewport=pyprocessing.lights%27-module.html#glViewport"><a title="pyprocessing.lights'.glViewport" class="py-name" href="#" onclick="return doclink('link-56', 'glViewport', 'link-56');">glViewport</a></tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-number">0</tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-57" class="py-name"><a title="pyprocessing.globs.screen.width
pyprocessing.pimage.PImage.width" class="py-name" href="#" onclick="return doclink('link-57', 'width', 'link-2');">width</a></tt><tt class="py-op">,</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="pyprocessing.globs.screen.height
pyprocessing.pimage.PImage.height" class="py-name" href="#" onclick="return doclink('link-58', 'height', 'link-4');">height</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line"> </tt>
<a name="FBO.detach"></a><div id="FBO.detach-def"><a name="L77"></a><tt class="py-lineno"> 77</tt> <a class="py-toggle" href="#" id="FBO.detach-toggle" onclick="return toggle('FBO.detach');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyprocessing.fbo.FBO-class.html#detach">detach</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FBO.detach-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="FBO.detach-expanded"><a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">        <tt class="py-docstring">"""Call this after rendering to the FBO so that rendering now</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line"><tt class="py-docstring">        goes to the regular frame buffer."""</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line"> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">        <tt class="py-comment"># Restore old view port and set rendering back to default frame buffer</tt> </tt>
<a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt id="link-59" class="py-name" targets="Variable pyprocessing.lights'.glPopAttrib=pyprocessing.lights%27-module.html#glPopAttrib"><a title="pyprocessing.lights'.glPopAttrib" class="py-name" href="#" onclick="return doclink('link-59', 'glPopAttrib', 'link-59');">glPopAttrib</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt>     </tt>
<a name="L83"></a><tt class="py-lineno"> 83</tt>  <tt class="py-line">        <tt id="link-60" class="py-name"><a title="pyprocessing.lights'.glBindFramebufferEXT" class="py-name" href="#" onclick="return doclink('link-60', 'glBindFramebufferEXT', 'link-8');">glBindFramebufferEXT</a></tt><tt class="py-op">(</tt><tt id="link-61" class="py-name"><a title="pyprocessing.lights'.GL_FRAMEBUFFER_EXT" class="py-name" href="#" onclick="return doclink('link-61', 'GL_FRAMEBUFFER_EXT', 'link-9');">GL_FRAMEBUFFER_EXT</a></tt><tt class="py-op">,</tt> <tt class="py-number">0</tt><tt class="py-op">)</tt> </tt>
</div><a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line"> </tt>
<a name="FBO.getTexture"></a><div id="FBO.getTexture-def"><a name="L85"></a><tt class="py-lineno"> 85</tt> <a class="py-toggle" href="#" id="FBO.getTexture-toggle" onclick="return toggle('FBO.getTexture');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyprocessing.fbo.FBO-class.html#getTexture">getTexture</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FBO.getTexture-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="FBO.getTexture-expanded"><a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">        <tt class="py-docstring">"""Returns a pyglet image with the contents of the FBO."""</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">data</tt> <tt class="py-op">=</tt> <tt class="py-op">(</tt><tt class="py-name">c_ubyte</tt> <tt class="py-op">*</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-62" class="py-name"><a title="pyprocessing.globs.screen.width
pyprocessing.pimage.PImage.width" class="py-name" href="#" onclick="return doclink('link-62', 'width', 'link-2');">width</a></tt><tt class="py-op">*</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-63" class="py-name"><a title="pyprocessing.globs.screen.height
pyprocessing.pimage.PImage.height" class="py-name" href="#" onclick="return doclink('link-63', 'height', 'link-4');">height</a></tt><tt class="py-op">*</tt><tt class="py-number">4</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">     </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">        <tt id="link-64" class="py-name" targets="Variable pyprocessing.lights'.glGetTexImage=pyprocessing.lights%27-module.html#glGetTexImage"><a title="pyprocessing.lights'.glGetTexImage" class="py-name" href="#" onclick="return doclink('link-64', 'glGetTexImage', 'link-64');">glGetTexImage</a></tt><tt class="py-op">(</tt><tt id="link-65" class="py-name"><a title="pyprocessing.lights'.GL_TEXTURE_2D" class="py-name" href="#" onclick="return doclink('link-65', 'GL_TEXTURE_2D', 'link-25');">GL_TEXTURE_2D</a></tt><tt class="py-op">,</tt> <tt class="py-comment"># target, </tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">                          <tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-comment"># level, </tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">                          <tt id="link-66" class="py-name"><a title="pyprocessing.lights'.GL_RGBA" class="py-name" href="#" onclick="return doclink('link-66', 'GL_RGBA', 'link-40');">GL_RGBA</a></tt><tt class="py-op">,</tt> <tt class="py-comment"># format, </tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">                          <tt id="link-67" class="py-name"><a title="pyprocessing.lights'.GL_UNSIGNED_BYTE" class="py-name" href="#" onclick="return doclink('link-67', 'GL_UNSIGNED_BYTE', 'link-41');">GL_UNSIGNED_BYTE</a></tt> <tt class="py-op">,</tt> <tt class="py-comment"># type, </tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">                          <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> <tt class="py-comment"># GLvoid * img</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">                       </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">pyglet</tt><tt class="py-op">.</tt><tt id="link-68" class="py-name" targets="Function pyprocessing.pimage.image()=pyprocessing.pimage-module.html#image"><a title="pyprocessing.pimage.image" class="py-name" href="#" onclick="return doclink('link-68', 'image', 'link-68');">image</a></tt><tt class="py-op">.</tt><tt class="py-name">ImageData</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-69" class="py-name"><a title="pyprocessing.globs.screen.width
pyprocessing.pimage.PImage.width" class="py-name" href="#" onclick="return doclink('link-69', 'width', 'link-2');">width</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-70" class="py-name"><a title="pyprocessing.globs.screen.height
pyprocessing.pimage.PImage.height" class="py-name" href="#" onclick="return doclink('link-70', 'height', 'link-4');">height</a></tt><tt class="py-op">,</tt> <tt class="py-string">'RGBA'</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">data</tt><tt class="py-op">)</tt> </tt>
</div><a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line">         </tt>
<a name="FBO.__del__"></a><div id="FBO.__del__-def"><a name="L97"></a><tt class="py-lineno"> 97</tt> <a class="py-toggle" href="#" id="FBO.__del__-toggle" onclick="return toggle('FBO.__del__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="pyprocessing.fbo.FBO-class.html#__del__">__del__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="FBO.__del__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="FBO.__del__-expanded"><a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">        <tt class="py-docstring">"""Deallocates memory. Call this before discarding FBO."""</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">        <tt id="link-71" class="py-name" targets="Variable pyprocessing.lights'.glDeleteFramebuffersEXT=pyprocessing.lights%27-module.html#glDeleteFramebuffersEXT"><a title="pyprocessing.lights'.glDeleteFramebuffersEXT" class="py-name" href="#" onclick="return doclink('link-71', 'glDeleteFramebuffersEXT', 'link-71');">glDeleteFramebuffersEXT</a></tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-name">byref</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">framebuffer</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">        <tt id="link-72" class="py-name" targets="Variable pyprocessing.lights'.glDeleteRenderbuffersEXT=pyprocessing.lights%27-module.html#glDeleteRenderbuffersEXT"><a title="pyprocessing.lights'.glDeleteRenderbuffersEXT" class="py-name" href="#" onclick="return doclink('link-72', 'glDeleteRenderbuffersEXT', 'link-72');">glDeleteRenderbuffersEXT</a></tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">,</tt> <tt class="py-name">byref</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">depthbuffer</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">        <tt id="link-73" class="py-name" targets="Variable pyprocessing.lights'.glDeleteTextures=pyprocessing.lights%27-module.html#glDeleteTextures"><a title="pyprocessing.lights'.glDeleteTextures" class="py-name" href="#" onclick="return doclink('link-73', 'glDeleteTextures', 'link-73');">glDeleteTextures</a></tt><tt class="py-op">(</tt><tt class="py-number">1</tt><tt class="py-op">,</tt><tt class="py-name">byref</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-74" class="py-name"><a title="pyprocessing.pimage.PImage.img" class="py-name" href="#" onclick="return doclink('link-74', 'img', 'link-6');">img</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pyprocessing-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Mon Jun 11 22:06:48 2012
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
